﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ProfilePage.aspx.vb" Inherits="WeightLossProject.ProfilePage" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="ProfileDIV" runat="server" style="padding:10px;">
    <h2 class="custom-header"> Member Profile (Summary)</h2>
    <asp:Label ID="lblPoints" runat="server" CssClass="frmDisplayPoints" Width="630px"></asp:Label>

    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
        AutoGenerateRows="False" BackColor="White" BorderColor="#CCCCCC" 
        BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="ID" 
        DataSourceID="dsProfilePage" ForeColor="Black" GridLines="Horizontal" 
        Height="50px" Width="640px">
        <EditRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        <Fields>
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                <ControlStyle Width="300px" />
            </asp:ImageField>
            <asp:BoundField DataField="wlUserName" HeaderText="User Name" 
                SortExpression="wlUserName" />
            <asp:BoundField DataField="Age" HeaderText="Age" SortExpression="Age" 
                DataFormatString="{0} Years Young" />
            <asp:BoundField DataField="Sex" HeaderText="Sex" SortExpression="Sex" />
            <asp:BoundField DataField="Description" HeaderText="Description" 
                SortExpression="Description" />
            <asp:BoundField DataField="Weight" HeaderText="Weight" 
                SortExpression="Weight" DataFormatString="{0} Kilograms" />
            <asp:BoundField DataField="Height" HeaderText="Height" 
                SortExpression="Height" DataFormatString="{0} Metres" />
            <asp:BoundField DataField="emailAddress" HeaderText="emailAddress" 
                SortExpression="emailAddress" />
            <asp:BoundField DataField="Website" HeaderText="Website" 
                SortExpression="Website" />
            <asp:BoundField DataField="Status" HeaderText="Status" 
                SortExpression="Status" />
            <asp:HyperLinkField DataNavigateUrlFields="tblProfilesEnhanced.Name" 
                DataNavigateUrlFormatString="http://maps.google.com?q={0}" 
                DataTextField="tblProfilesEnhanced.Name" HeaderText="Location" 
                Target="_blank" />
            <asp:BoundField DataField="targetWeight" DataFormatString="{0} Kilograms" 
                HeaderText="My Target Weight" SortExpression="targetWeight">
            <ControlStyle Font-Bold="True" ForeColor="#009900" />
            </asp:BoundField>
        </Fields>
        <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
        <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
    </asp:DetailsView>
    <asp:SqlDataSource ID="dsProfilePage" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [tblProfilesEnhanced] WHERE ([UserID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="UserID" QueryStringField="UID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:LineChart ID="LineChart1" runat="server" BorderStyle="None" 
        Height="300px" Width="640px" BorderWidth="1px" 
        ChartTitle="Weight Loss Progress History!" ChartHeight="300" 
        ChartType="Stacked">
    </asp:LineChart>
    <br />
    </div>
</asp:Content>
